package com.trhui.mallbook.client;

import com.trhui.mallbook.domain.common.ApiRequest;
import com.trhui.mallbook.domain.common.BaseResponse;
import com.trhui.mallbook.domain.request.dg.DgMerchantBizOpenRequest;
import com.trhui.mallbook.domain.response.dg.DgMerchantBizOpenResponse;
import com.trhui.mallbook.enums.ChannelTypeEnum;
import com.trhui.mallbook.enums.ServerCodeEnum;

/**
 * 商户业务开通相关接口
 *
 */
public class MerchantBizOpenClient extends AbstractClient {

    /**
     * DG业务开通
     *
     */
    public static BaseResponse<DgMerchantBizOpenResponse> bizOpen(DgMerchantBizOpenRequest request) {
        ApiRequest apiRequest = new ApiRequest.ApiRequestBuild()
                .merOrderId(request.getMerOrderId())
                .merchantNo(request.getMerchantNo())
                .params(request)
                .serverCode(ServerCodeEnum.RCV_MERCHANT_BIZ_OPEN)
                .channelType(ChannelTypeEnum.DG)
                .build();
        return post(apiRequest, DgMerchantBizOpenResponse.class);
    }




}
